package com.ruoyi.shop.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.shop.mapper.Product_InfoMapper;
import com.ruoyi.shop.domain.Product_Info;
import com.ruoyi.shop.service.IProduct_InfoService;

/**
 * 商品信息Service业务层处理
 * 
 * @author cwc
 * @date 2024-12-13
 */
@Service
public class Product_InfoServiceImpl implements IProduct_InfoService 
{
    @Autowired
    private Product_InfoMapper product_InfoMapper;

    /**
     * 查询商品信息
     * 
     * @param productId 商品信息主键
     * @return 商品信息
     */
    @Override
    public Product_Info selectProduct_InfoByProductId(Long productId)
    {
        return product_InfoMapper.selectProduct_InfoByProductId(productId);
    }

    /**
     * 查询商品信息列表
     * 
     * @param product_Info 商品信息
     * @return 商品信息
     */
    @Override
    public List<Product_Info> selectProduct_InfoList(Product_Info product_Info)
    {
        return product_InfoMapper.selectProduct_InfoList(product_Info);
    }

    /**
     * 新增商品信息
     * 
     * @param product_Info 商品信息
     * @return 结果
     */
    @Override
    public int insertProduct_Info(Product_Info product_Info)
    {
        return product_InfoMapper.insertProduct_Info(product_Info);
    }

    /**
     * 修改商品信息
     * 
     * @param product_Info 商品信息
     * @return 结果
     */
    @Override
    public int updateProduct_Info(Product_Info product_Info)
    {
        return product_InfoMapper.updateProduct_Info(product_Info);
    }

    /**
     * 批量删除商品信息
     * 
     * @param productIds 需要删除的商品信息主键
     * @return 结果
     */
    @Override
    public int deleteProduct_InfoByProductIds(Long[] productIds)
    {
        return product_InfoMapper.deleteProduct_InfoByProductIds(productIds);
    }

    /**
     * 删除商品信息信息
     * 
     * @param productId 商品信息主键
     * @return 结果
     */
    @Override
    public int deleteProduct_InfoByProductId(Long productId)
    {
        return product_InfoMapper.deleteProduct_InfoByProductId(productId);
    }
}
